﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace DataProcessor.Repository
{
    public interface IRepository<T> where T : class
    {
        void Add(T entity);
        void AddBulk(IEnumerable<T> entities);
        void Update(T entity);
        void Delete(T entity);
        void Delete(string id);
        void Delete(int id);
        void Delete(Guid id);
        T Get(string id);
        T Get(Guid id);
        T Get(int id);
        T Get(T entity);
        T Get(Expression<Func<T, bool>> func);
        IEnumerable<T> GetAll();
        IEnumerable<T> GetList(Expression<Func<T, bool>> where = null, Expression<Func<T, bool>> order = null);
        long Count(Expression<Func<T, bool>> where = null);
    }
}